@model HttpsSettingsViewModel

<p class="alert alert-warning">@T["The current tenant will be reloaded when the settings are saved."]</p>

<fieldset class="form-group" asp-validation-class-for="RequireHttps">
    <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" asp-for="RequireHttps" asp-is-disabled="@(!Model.IsHttpsRequest)" />
        <label class="custom-control-label" asp-for="RequireHttps">@T["Require HTTPS"]</label>
        <span class="hint">@T["— {0}", "Require HTTPS for all requests"]</span>
    </div>
</fieldset>

<fieldset class="form-group" asp-validation-class-for="EnableStrictTransportSecurity">
    <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" asp-for="EnableStrictTransportSecurity" asp-is-disabled="@(!Model.IsHttpsRequest)" />
        <label class="custom-control-label" asp-for="EnableStrictTransportSecurity">@T["Enable HSTS"]</label>
        <span class="hint">@T["— {0}", "Indicates to browsers that connecting without transport security (e.g SSL or TLS) isn't allowed."]</span>
    </div>

    <div class="alert alert-danger">@T["This option should be enabled with caution, as it may prevent users from connecting if HTTPS was later disabled or wasn't available."]</div>
</fieldset>

<fieldset class="form-group" asp-validation-class-for="RequireHttpsPermanent">
    <div class="custom-control custom-checkbox">
        <input type="checkbox" class="custom-control-input" asp-for="RequireHttpsPermanent" asp-is-disabled="@(!Model.IsHttpsRequest)" />
        <label class="custom-control-label" asp-for="RequireHttpsPermanent">@T["Require HTTPS Permanent"]</label>
        <span class="hint">@T["— {0}", "Specifies whether a permanent redirect, 308 Moved Permanently, should be used instead of a temporary redirect, 307 Found, when redirecting to HTTPS"]</span>
    </div>
</fieldset>

<fieldset class="form-group" asp-validation-class-for="SslPort">
    <label asp-for="SslPort">@T["SSL Port"]</label>
    <input asp-for="SslPort" class="form-control" type="number" asp-is-disabled="@(!Model.IsHttpsRequest)" />
    <span asp-validation-for="SslPort"></span>
    <span class="hint">@T["The SSL Port Number, leave empty to let the middlware try to determinate it."]</span>
</fieldset>
